package lab2;

/**
 * 配置文件类
 */
public class Configuration {
    public static final String host = "localhost"; //本机地址
    public static final int clientPort = 9999; //客户端端口号
    public static final int serverPort = 6666; //服务器端端口号

    public static final String clientDataSentFilePath = "./src/lab2/data/client_data_send.pdf"; //客户端待发送的文件路径
    public static final String clientDataReceiveFilePath = "./src/lab2/data/client_data_receive.pdf"; //客户端待接收的文件路径
    public static final String serverDataSentFilePath = "./src/lab2/data/server_data_send.pdf"; //服务器待发送的文件路径
    public static final String serverDataReceiveFilePath = "./src/lab2/data/server_data_receive.pdf"; //服务器待接收的文件路径

    public static int sendWindowSize = 20; //发送窗口大小
    public static int receiveWindowSize = 20; //接收窗口大小
    public static double sendLoss = 0.15; //发送丢包率，即数据包丢包率
    public static double receiveLoss = 0.1; //接收丢包率，即ack丢包率
    public static int timeOut = 500; //设置计时器最大计时的时间
    public static final int socketTimeOut = 1000; //设置socket超时时间

    public static final int maxDataLength = 1024; //UDP数据报最大字节数
    public static final int maxACKByteNumber = 1; //ACK最大的序号的字节数
    public static int maxACKNumber = (int) (Math.pow(256, maxACKByteNumber)); // ACK最大序号的上一个序号,为 pow(256, maxACKByteNumber)
}
